
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<body>

	<ui:composition template="/templates/template.xhtml">

		<ui:define name="title">#{msgs.fnCrudTitle}</ui:define>

		<ui:define name="body">
			<h:form id="form">

				<p:inputText id="Id" type="hidden" value="#{functionBean.id}"></p:inputText>

				<p:panel header="#{msgs.fnCrudTitle}"
					style="width:50%;margin-left: auto; margin-right: auto;">
					<p:messages id="messages">
						<p:effect type="pulsate" event="load" />
					</p:messages>
					<h:panelGrid columns="2" id="grid">

						<h:outputLabel value="#{msgs.fnCrudName}" for="Name"></h:outputLabel>
						<p:inputText id="Name" value="#{functionBean.name}"
							required="true" label="#{msgs.fnCrudName}" />

						<h:outputLabel value="#{msgs.fnCrudDescription}" for="Description"></h:outputLabel>
						<p:inputText id="Description" value="#{functionBean.description}"
							required="true" label="#{msgs.fnCrudDescription}" maxlength="255"
							size="45" />

						<p:commandButton value="#{msgs.loginReset}" type="reset" />
						<p:commandButton value="#{msgs.saveLabel}"
							action="#{functionBean.saveFunction}" update="messages" />
					</h:panelGrid>
				</p:panel>
			</h:form>
		</ui:define>
	</ui:composition>
</body>
</html>